package com.lushu.helpers {
import com.lushu.info.ApplicationData;
import com.sfdk.io.GenericIO;

import flash.events.Event;
import flash.events.EventDispatcher;

public class ConfigReader extends EventDispatcher {
    private var ioUtil_:GenericIO;

    public function ConfigReader() {
//        ioUtil_ = new GenericIO("config/main.xml");
//        ioUtil_.addEventListener(ResourceEvent.FILE_LOADED, getConfig);
//        ioUtil_.read();
        getConfig();
    }

    private function getConfig():void {
        ApplicationData.BASE_LOCATION = "http://dev.lushu.org/mapEditor";
        ApplicationData.ZONE_DIRECTORY = "zones";
        ApplicationData.BACKUP_DIRECTORY = "backup";
        ApplicationData.TILESET_DIRECTORY = "tileset";
        ApplicationData.REALIMG_DIRECTORY = "images/realsize";
        ApplicationData.THUMBIMG_DIRECTORY = "images/thumbnail";
        ApplicationData.INTERIEUR_DIRECTORY = "interieur";
        dispatchEvent(new Event("configRead"));
    }

}
}